<%= form_for @banners, :url => "" do |f| %>
  <% if @banners.errors.any? %>
     <p class="err_message">
      <% @banners.errors.full_messages.each do |msg| %> 
        <span><%= msg %></span>
      <% end %>
      </p>
  <% else %>
     <p class="err_message"></p>  
  <% end %>


		<p class="name">Баннер 1</p>
		<div class="element">
			  <%if (@banners.banner1.url != "/images/missing.png")%>
		 		<%= image_tag(@banners.banner1.url(:small), :class => "photo") %>
			  <%end%>
			  <%= f.file_field( :banner1, :class => 'file') %>
		</div>	
		

		<p class="name">Баннер 2</p>
		<div class="element">
			  <%if (@banners.banner2.url != "/images/missing.png")%>
		 		<%= image_tag(@banners.banner2.url(:small), :class => "photo") %>
			  <%end%>
			  <%= f.file_field( :banner2, :class => 'file') %>
		</div>		
		

		<p class="name">Баннер 3</p>
		<div class="element">
			  <%if (@banners.banner3.url != "/images/missing.png")%>
		 		<%= image_tag(@banners.banner3.url(:small), :class => "photo") %>
			  <%end%>
			  <%= f.file_field( :banner3, :class => 'file') %>
		</div>		
		

		<p class="name">Баннер 4</p>
		<div class="element">
			  <%if (@banners.banner4.url != "/images/missing.png")%>
		 		<%= image_tag(@banners.banner4.url(:small), :class => "photo") %>
			  <%end%>
			  <%= f.file_field( :banner4, :class => 'file') %>
		</div>		
		

		<p class="name">Баннер 5</p>
		<div class="element">
			  <%if (@banners.banner5.url != "/images/missing.png")%>
		 		<%= image_tag(@banners.banner5.url(:small), :class => "photo") %>
			  <%end%>
			  <%= f.file_field( :banner5, :class => 'file') %>
		</div>									
		
		
		<a class="button" href="#" onclick="$('form').submit(); return false;">Сохранить</a>
		
<% end %>